home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Miscellany
/
Patch.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
503b
|
25 lines
// Patch.cp
#ifndef Patch_h
#include "Patch.h"
#endif
PatchBase::PatchBase( TrapType theType,
int16 theTrapNumber,
int32 theProcInfo,
const RoutineDescriptor *patch )
: old( NGetTrapAddress( theTrapNumber, theType ) ),
procInfo( theProcInfo ),
trapNumber( theTrapNumber ),
type( theType )
{
NSetTrapAddress( const_cast<RoutineDescriptor *>( patch ),
trapNumber,
type );
}
PatchBase::~PatchBase()
{
NSetTrapAddress( old, trapNumber, type );
}